<template>
  <div class="m-custom-poptip" v-on:click.stop>
    <Poptip :confirm="true" :title="confirmTitle" @on-ok="ok" :transfer="transfer">
      <Button :icon="icon" :type="btnType" :disabled="disabled" :size="btnSize">{{ btnText }}</Button>
    </Poptip>
  </div>
</template>
<script>
export default {
  props: {
    confirmTitle: {
      type: String,
      default: ''
    },
    icon: {
      type: String
    },
    btnType: {
      type: String,
      default: ''
    },
    btnText: {
      type: String,
      default: ''
    },
    btnSize: {
      type: String,
      default: ''
    },
    transfer: {
      type: Boolean,
      default: true
    },
    disabled: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    ok () {
      this.$emit('ok')
    }
  }
}
</script>

<style lang="scss">
.m-custom-poptip {
  display: inline-block;
}
</style>
